package com.webchat.chat.service;
import com.webchat.chat.core.Service;
import com.webchat.chat.core.baseEntity.Result;
import com.webchat.chat.model.Role;

import java.util.List;


/**
 * Created by admin on 2018-06-29.
 */
public interface RoleService extends Service<Role> {

    List<Role> findRolesByUserId(String userId);

    /**
     * 根据用户ID查找此所有角色名
     * @param userId 用户ID
     * @return
     */
    List<String> findRoleNamesByUserId(String userId);

    Result checkRole(Role role);

    Role findDetailById(String id);

    List<Role> findRoleByInfo(Role role);

    Role saveAndReturnRole(Role role);

    List<Role> findAllByTenantCode();

}
